package model;

import java.lang.reflect.Field;
import java.util.List;
import java.util.Map;

public class FieldDeclared implements StatementKind{
	private final Class<?> clazz;
	private Field constant;
	public FieldDeclared(Class<?> clazz,Field constant){
		this.clazz = clazz;
		this.constant= constant;
	}
	
	  public String convertString(){
		  return this.toString1(this.clazz);
	  }
	  @Override
	  public String toString() {
	    return convertString();
	  }
	  public Class<?> getOutputType() {
		  return this.clazz;
	  }
	  public Field getConstant() {
		  return this.constant;
	  }

	  public  String toParseableString(Map<String,Class<?>> classesToTest){
		 	return toString1(this.clazz);

	  }
	  public List<Class<?>> getInputTypes() {
		  return null;
	  }
	  public  String toString1(Class<?> c) {
		     StringBuilder sb = new StringBuilder();
		     sb.append(c.getName() + " = ");
		     sb.append(this.constant.getDeclaringClass().getName().toString()+ "."+ this.constant.getName());		     
		     return sb.toString();
		   }

}
